home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_091 / samples / mpu / objects.adl < prev    next >
Text File  |  1992-05-06  |  27KB  |  1,080 lines

  1. ADJEC red,green,blue,clear;
  2. ADJEC glass, silver;
  3.  
  4. NOUN red message(road2);        { It's red so there can be others elsewhere }
  5. red message(WEIGH) = CAPAC;
  6. red message(LDESC) = ($say "There is a message scratched in the dirt.\n");
  7. red message(SDESC) = ($say "a message in the dirt");
  8. red message(ACTION) =
  9.     (IF ($or ($eq ($verb) read) ($eq ($verb) examine)) THEN
  10.     ($say "'in' is a preposition.  'enter' is a verb.\n")
  11.     ($exit 1)
  12.     )
  13. ;
  14.  
  15. NOUN keys (town4);
  16. keys(WEIGH) = 2;
  17. keys(LDESC) = ($say "There's a set of keys here.\n");
  18. keys(SDESC) = ($say "a set of keys");
  19. ADJEC tool;
  20.  
  21. NOUN tool box (farm5);
  22. toolbox = tool box;
  23. toolbox(WEIGH) = CAPAC;
  24. toolbox(HOLDS) = 50;
  25. toolbox(OPENS) = TRUE;
  26. toolbox(LOCKS) = TRUE;
  27. toolbox(LOCKED) = TRUE;
  28. toolbox(LIGHT) = TRUE;
  29. toolbox(LDESC) =
  30.     (IF ($eq ($loc .ME) toolbox) THEN
  31.     ($say
  32. "You are in a huge wooden structure, towering up at least 80 feet
  33. above your head, with wooden walls formed of immense 10-foot by 50-foot
  34. boards.  Everything here, even the grains of dust which cover the wooden
  35. floor, seems immense.  "
  36.     )
  37.     (IF ($prop toolbox OPENED) THEN
  38.         ($say
  39. "Above your head, the top of the structure is open,
  40. and sunlight streams in.\n"
  41.         )
  42.      ELSE
  43.         ($say
  44. "The structure is closed at the top, but
  45. enough light comes in from between the boards to enable you to see.\n"
  46.         )
  47.     )
  48.      ELSE
  49.     ($say "Against\nthe house is a heavy ")
  50.     (IF ($prop toolbox OPENED) THEN
  51.         ($say "toolbox with the lid open.\n")
  52.      ELSEIF ($prop toolbox LOCKED) THEN
  53.         ($say
  54. "toolbox with a rusty lock, painted with
  55. an insignia composed of blue and green squares, joined at
  56. their corners.\n"
  57.         )
  58.      ELSE
  59.         ($say "toolbox, the lid of which is ajar.\n")
  60.     )
  61.     )
  62. ;
  63. toolbox(SDESC) =
  64.     (IF ($eq ($loc .ME) toolbox) THEN
  65.     ($return (Sayer "Inside Huge Box" %0))
  66.      ELSE
  67.     ($say "a toolbox")
  68.     )
  69. ;
  70. toolbox(ACTION) =
  71.     (IF ($eq ($phase) 7) THEN
  72.     { This is the room action }
  73.     (IF    ($or    ($eq ($verb) drop)
  74.             ($eq ($verb) throw)
  75.         )
  76.      THEN
  77.         { We don't want to keep track of lots of small things }
  78.         ($say "You just lost ")
  79.         (($sdesc ($dobj)))
  80.         ($say " in a crack between the wooden floorboards!\n")
  81.         ($move ($dobj) .ALL)
  82.     )
  83.      ELSEIF ($eq ($verb) lock) THEN
  84.     (IF ($prop toolbox OPENED) THEN
  85.         ($say "You must close it first.\n")
  86.         ($exit 1)
  87.      ELSEIF ($prop toolbox LOCKED) THEN
  88.         ($say "It's already locked!\n")
  89.         ($exit 1)
  90.      ELSEIF ($eq ($loc keys) .ME) THEN
  91.         ($say "The toolbox seals with a CLICK!\n")
  92.         ($setp toolbox LOCKED TRUE)
  93.         ($exit 1)
  94.     )
  95.      ELSEIF ($eq ($verb) unlock) THEN
  96.     (IF ($not ($prop toolbox LOCKED)) THEN
  97.         ($say "It's already unlocked!\n")
  98.         ($exit 1)
  99.      ELSEIF ($eq ($loc keys) .ME) THEN
  100.         ($say "One of the keys fits!  The box is unlocked.\n")
  101.         ($setp toolbox LOCKED FALSE)
  102.         ($exit 1)
  103.     )
  104.      ELSEIF ($eq ($verb) examine) THEN
  105.     (IF ($prop toolbox OPENED) THEN
  106.         ($say "The toolbox is open.\n")
  107.      ELSEIF ($prop toolbox LOCKED) THEN
  108.         ($say "The toolbox is locked.\n")
  109.      ELSE
  110.         ($say "The toolbox is ajar.\n")
  111.     )
  112.     ($exit 1)
  113.     )
  114. ;
  115.  
  116. NOUN silver spoon(farm6);
  117. silver spoon(POINT) = 25;
  118. silver spoon(WEIGH) = 1;
  119. silver spoon(LDESC) = ($say "There is a beautiful silver spoon here.\n");
  120. silver spoon(SDESC) = ($say "a silver spoon");
  121.  
  122.  
  123. NOUN wetsuit(cel15);
  124. WORN = MISC1;
  125. wetsuit(LDESC) = ($say "There is a wetsuit here.\n");
  126. wetsuit(SDESC) =
  127.     ($say "a wetsuit")
  128.     (IF ($prop wetsuit WORN) THEN
  129.     ($say " (being worn)")
  130.     )
  131. ;
  132. wetsuit(WEIGH) = 50;
  133. wetsuit(ACTION) =
  134.     (IF ($eq ($verb) wear) THEN
  135.     (IF ($ne ($loc wetsuit) .ME) THEN
  136.         ($say "You don't have the wetsuit!\n")
  137.         ($exit 1)
  138.      ELSEIF ($prop wetsuit WORN) THEN
  139.         ($say "You are already wearing it!\n")
  140.         ($exit 1)
  141.      ELSE
  142.         ($setp wetsuit WORN TRUE)
  143.         ($say "OK, you're wearing the wetsuit.\n")
  144.         ($exit 1)
  145.     )
  146.      ELSEIF ($eq ($verb) remove) THEN
  147.     (IF ($prop wetsuit WORN) THEN
  148.         ($setp wetsuit WORN FALSE)
  149.         ($say "OK, you're no longer wearing the wetsuit.\n")
  150.         ($exit 1)
  151.      ELSE
  152.         ($say "You are not wearing the wetsuit!\n")
  153.         ($exit 1)
  154.     )
  155.      ELSEIF ($eq ($verb) drop) THEN
  156.     (IF ($prop wetsuit WORN) THEN
  157.         ($say "You'll have to remove the wetsuit first.\n")
  158.         ($setg Skip TRUE)
  159.     )
  160.     )
  161. ;
  162.  
  163. NOUN signpost(Roadx);
  164. signpost(RDLOC)=10;
  165. signpost(WEIGH)=CAPAC;
  166. signpost(LDESC)=($say "There is a signpost by the side of the road.\n");
  167. signpost(SDESC)=($say "a signpost");
  168. signpost(ACTION) =
  169.     (IF ($or ($eq ($verb) read) ($eq ($verb) examine)) THEN
  170.         ($say "Pointing east, it says: 'Unuchevala: 10 miles'\n")
  171.         ($exit 1)
  172.     )
  173. ;
  174.  
  175. NOUN globe(toolbox);
  176. globe(WEIGH) = 20;
  177. globe(LDESC) =
  178.     (IF ($prop globe LIGHT) THEN
  179.         ($say "A globe of stone glows brightly here.\n")
  180.      ELSE
  181.         ($say "There is a strange globe of polished stone here.\n")
  182.     )
  183. ;
  184. globe(SDESC) =
  185.     (IF ($prop globe LIGHT) THEN
  186.         ($say "a glowing globe of stone")
  187.      ELSE
  188.         ($say "a stone globe")
  189.     )
  190. ;
  191. globe(ACTION) =
  192.     (IF ($eq ($verb) rub) THEN
  193.     (IF ($prop globe LIGHT) THEN
  194.         ($say "The light from the stone globe fades away.\n")
  195.         ($setp globe LIGHT FALSE)
  196.      ELSE
  197.         ($say "The stone globe glows brightly!\n")
  198.         ($setp globe LIGHT TRUE)
  199.     )
  200.     ($setg MyLoc -1)
  201.     ($exit 1)
  202.      ELSEIF ($eq ($verb) examine) THEN
  203.     (IF ($prop globe LIGHT) THEN
  204.         ($say "The globe is glowing.\n")
  205.         ($exit 1)
  206.     )
  207.     )
  208. ;
  209.  
  210.  
  211. NOUN crowbar (town3);
  212. crowbar(WEIGH) = 100;
  213. crowbar(LDESC) = ($say "There is a long crowbar here.\n");
  214. crowbar(SDESC) = ($say "a crowbar");
  215.  
  216. crydie =
  217.     ($say
  218. "What POWER!  The magic crystal releases a flood of energy in
  219. a split-second!  Unfortunately, you were a little close...\n"
  220.     )
  221.     (die)
  222. ;
  223. { Dragon Stuff }
  224. AWAKE=MISC1;
  225.  
  226. NOUN dragon (cel06);
  227.  
  228.  
  229. white=clear;
  230. NOUN green crystal(cel07);
  231. NOUN red crystal(cel08);
  232. NOUN blue crystal(cel10);
  233. NOUN clear crystal(cel09);
  234.  
  235. diamond = clear crystal;
  236. sapphire =  blue crystal;
  237. ruby = red crystal;
  238. emerald = green crystal;
  239.  
  240. WORKD = MISC1;
  241.  
  242. green crystal(WEIGH)=15;
  243. green crystal(POINT)=25;
  244. green crystal(LDESC) = ($say "There is a beautiful green crystal here!\n");
  245. green crystal(SDESC) = ($say "a green crystal");
  246.  
  247. green crystal(ACTION) =
  248.     (IF ($eq ($verb) take) THEN
  249.     (IF ($and ($not ($prop dragon KILLED)) ($eq ($loc .ME) cel07)) THEN
  250.         (IF ($not ($prop dragon AWAKE)) THEN
  251.         ($say "You hear a stirring nearby.\n")
  252.         ($setg Tempr ($plus @Tempr 2))
  253.         ($setp dragon AWAKE TRUE)
  254.         ($setp cel06 SEEN FALSE)
  255.          ELSE
  256.         ($setg Tempr 0)
  257.         )
  258.     )
  259.      ELSEIF ($eq ($verb) drop) THEN
  260.     (IF ($and ($not ($prop dragon KILLED)) ($eq ($loc .ME) cel07)) THEN
  261.         ($setg Tempr ($minus @Tempr 2))
  262.         (IF ($le @Tempr 0) THEN
  263.             ($setp dragon AWAKE FALSE)
  264.             ($say "You hear a deep  Y A W N  nearby.\n")
  265.         )
  266.         ($setp cel06 SEEN FALSE)
  267.         )
  268.      ELSEIF ($eq ($verb) touch) THEN
  269.     (IF ($eq ($dobj) [red crystal]) THEN
  270.         (IF ($eq ($loc .ME) toolbox) THEN
  271.         ($say "The red and green crystals flare briefly!\n")
  272.         (Grow)
  273.         ($move .ME cel01)
  274.         ($setg MyLoc -1)
  275.          ELSE
  276.         ($say "Nothing happens.\n")
  277.         )
  278.         ($exit 1)
  279.      ELSEIF ($eq ($dobj) [blue crystal]) THEN
  280.         (IF ($gt ($prop [green crystal] WORKD) 2) THEN
  281.         ($say "Nothing happens.\n")
  282.          ELSE
  283.         ($setp [green crystal] WORKD
  284.             ($plus ($prop [green crystal] WORKD) 1)
  285.         )
  286.         ($say "The blue and green crystals flare briefly!\n")
  287.         ($move .ME toolbox)
  288.         (Shrink)
  289.         ($setg MyLoc -1)
  290.         )
  291.         ($exit 1)
  292.      ELSEIF ($eq ($dobj) [clear crystal]) THEN
  293.         ($say "Nothing happens.\n")
  294.         ($exit 1)
  295.     )
  296.      ELSEIF ($eq ($verb) break) THEN
  297.     (IF ($eq ($dobj) [green crystal]) THEN
  298.         (crydie)
  299.     )
  300.     )
  301. ;
  302.  
  303. red crystal(WEIGH)=15;
  304. red crystal(POINT)=25;
  305. red crystal(LDESC) = ($say "There is a beautiful red crystal here!\n");
  306. red crystal(SDESC) = ($say "a red crystal");
  307. red crystal(ACTION) =
  308.     (IF ($eq ($verb) touch) THEN
  309.     (IF ($eq ($dobj) [clear crystal]) THEN
  310.         (IF ($not ($prop [clear crystal] WORKD)) THEN
  311.         ($say "The red and clear crystals flare briefly!\n")
  312.         ($setp [clear crystal] WORKD TRUE)
  313.         ($setp [clear crystal] LIGHT TRUE)
  314.         ($say
  315. "The clear crystal blazes forth with a magical incandescence brilliant
  316. enough to penetrate even the deepest darkness!!\n\n"
  317.         )
  318.         ($move .ME cel04)
  319.         ($setg MyLoc -1)
  320.         ($sfus .ME CRout 7)
  321.         ($exit 1)
  322.          ELSE
  323.         ($say "Nothing happens.\n")
  324.         ($exit 1)
  325.         )
  326.      ELSEIF ($eq ($dobj) [green crystal]) THEN
  327.         (IF ($eq ($loc .ME) toolbox) THEN
  328.         ($say "The red and green crystals flare briefly!\n")
  329.         (Grow)
  330.         ($move .ME cel01)
  331.         ($setg MyLoc -1)
  332.          ELSE
  333.         ($say "Nothing happens.\n")
  334.         )
  335.         ($exit 1)
  336.      ELSEIF ($eq ($dobj) [blue crystal]) THEN
  337.         (IF ($or ($eq ($loc .ME) desert) ($eq ($loc .ME) field)) THEN
  338.         ($say "The red and blue crystals flare briefly!\n")
  339.         ($move .ME cel08)
  340.         ($setg MyLoc -1)
  341.          ELSEIF ($not @RBTouch) THEN
  342.         ($say "The red and blue crystals flare briefly!\n")
  343.         ($setg RBTouch TRUE)
  344.          ELSE
  345.         ($say "Nothing happens.\n")
  346.         )
  347.         ($exit 1)
  348.     )
  349.      ELSEIF ($eq ($verb) break) THEN
  350.     (IF ($eq ($dobj) [red crystal]) THEN
  351.         (crydie)
  352.     )
  353.     )
  354. ;
  355.  
  356.  
  357. blue crystal(WEIGH)=15;
  358. blue crystal(POINT)=25;
  359. blue crystal(LDESC) = ($say "There is a beautiful blue crystal here!\n");
  360. blue crystal(SDESC) = ($say "a blue crystal");
  361. blue crystal(ACTION) =
  362.     (IF ($eq ($verb) touch) THEN
  363.     (IF ($eq ($dobj) [red crystal]) THEN
  364.         (IF ($or ($eq ($loc .ME) desert) ($eq ($loc .ME) field)) THEN
  365.         ($say "The red and blue crystals flare briefly!\n")
  366.         ($setg RBTouch TRUE)
  367.         ($move .ME cel08)
  368.         ($setg MyLoc -1)
  369.          ELSEIF ($not @RBTouch) THEN
  370.         ($say "The red and blue crystals flare briefly!\n")
  371.         ($setg RBTouch TRUE)
  372.          ELSE
  373.         ($say "Nothing happens.\n")
  374.         )
  375.         ($exit 1)
  376.      ELSEIF ($eq ($dobj) [green crystal]) THEN
  377.         (IF ($gt ($prop [green crystal] WORKD) 2) THEN
  378.         ($say "Nothing happens.\n")
  379.          ELSE
  380.         ($say "The blue and green crystals flare briefly!\n")
  381.         ($move .ME toolbox)
  382.         (Shrink)
  383.         ($setg MyLoc -1)
  384.         ($setp [green crystal] WORKD
  385.                 ($plus ($prop [green crystal] WORKD) 1)
  386.         )
  387.         )
  388.         ($exit 1)
  389.      ELSEIF ($eq ($dobj) [clear crystal]) THEN
  390.         ($say "Nothing happens.\n")
  391.         ($exit 1)
  392.     )
  393.      ELSEIF ($eq ($verb) break) THEN
  394.     (IF ($eq ($dobj) [blue crystal]) THEN
  395.         (crydie)
  396.     )
  397.     )
  398. ;
  399.  
  400. CRout =
  401.     ($setp [clear crystal] LIGHT FALSE)
  402.     ($say "The glowing magical crystal seems to have gone dark.\n")
  403. ;
  404.  
  405. clear crystal(WEIGH)=15;
  406. clear crystal(POINT)=25;
  407. clear crystal(LDESC) =
  408.     ($say "There is a beautiful clear crystal here")
  409.     (IF ($prop [clear crystal] LIGHT) THEN
  410.     ($say " (GLOWING!)")
  411.     )
  412.     ($say "!\n")
  413. ;
  414. clear crystal(SDESC) =
  415.     ($say "a clear crystal")
  416.     (IF ($prop [clear crystal] LIGHT) THEN
  417.     ($say " (GLOWING!)")
  418.     )
  419. ;
  420. clear crystal(ACTION) =
  421.     (IF ($eq ($verb) touch) THEN
  422.     (IF ($eq ($dobj) [red crystal]) THEN
  423.         (IF ($not ($prop [clear crystal] WORKD)) THEN
  424.         ($say "The red and clear crystals flare briefly!\n")
  425.         ($setp [clear crystal] WORKD TRUE)
  426.         ($setp [clear crystal] LIGHT TRUE)
  427.         ($say
  428. "The clear crystal blazes forth with a magical incandescence brilliant
  429. enough to penetrate even the deepest darkness!!\n\n"
  430.         )
  431.         ($move .ME cel04)
  432.         ($setg MyLoc -1)
  433.         ($sfus .ME CRout 7)
  434.         ($exit 1)
  435.          ELSE
  436.         ($say "Nothing happens.\n")
  437.         ($exit 1)
  438.         )
  439.      ELSEIF ($eq ($dobj) [green crystal]) THEN
  440.         ($say "Nothing happens.\n")
  441.         ($exit 1)
  442.      ELSEIF ($eq ($dobj) [blue crystal]) THEN
  443.         ($say "Nothing happens.\n")
  444.         ($exit 1)
  445.     )
  446.      ELSEIF ($eq ($verb) break) THEN
  447.     (IF ($eq ($dobj) [red crystal]) THEN
  448.         (crydie)
  449.     )
  450.     )
  451. ;
  452.  
  453.  
  454. NOUN    wood(cel20);
  455. ROUTINE    KillDragon;
  456. DRdem =            { Dragon Daemon.  Increases temper in .my presence }
  457.     (IF ($or ($prop dragon KILLED) ($not ($prop dragon AWAKE))) THEN
  458.     (IF %1 THEN ($say "\n"))
  459.     ($return 0)
  460.     )
  461.     (IF ($eq ($loc .ME) ($loc dragon)) THEN
  462.     (IF ($eq ($loc [green crystal]) .ME) THEN      { even worse! }
  463.         ($setg Tempr ($plus @Tempr 1))
  464.     )
  465.     ($setg Tempr ($plus @Tempr 1))
  466.     (IF ($and ($prop wood FLAME) ($eq ($loc wood) ($loc .ME))) THEN
  467.         (KillDragon)
  468.         ($return 0)
  469.     )
  470.     )
  471.     (IF ($ge @Tempr 7) THEN
  472.     ($say
  473. "Jeez, I didn't know ice dragons could reach their boiling point!
  474. In a final flare of rage, he opens his mouth and breathes his frigid
  475. breath in a blast in your direction.  It's a bit much for you."
  476.     )
  477.     (die)
  478.      ELSEIF ($ge @Tempr 6) THEN
  479.     ($say "Gee, he looks like he's really at the edge!")
  480.      ELSEIF ($ge @Tempr 5) THEN
  481.     ($say "This is one upset dragon!  Be careful!")
  482.      ELSEIF ($ge @Tempr 3) THEN
  483.     ($say "He's getting angrier...")
  484.     )
  485.     (IF %1 THEN ($say "\n"))
  486. ;
  487.  
  488. dragon(WEIGH)=CAPAC;
  489. dragon(LDESC)=
  490.     (IF ($prop dragon AWAKE) THEN
  491.     ($say
  492. "There is a fierce ice dragon glaring balefully in your direction.  "
  493.     )
  494.      ELSE
  495.     ($say
  496. "There is a large white dragon sleeping peacefully in the middle
  497. of the cavern floor.  "
  498.     )
  499.     )
  500.     (DRdem 1)
  501. ;
  502. dragon(SDESC)=
  503.     (IF ($prop dragon AWAKE) THEN
  504.     ($say "a fierce dragon.  ")
  505.      ELSE
  506.     ($say "a somnolent dragon.  ")
  507.     )
  508.     (IF ($ne @MyLoc ($loc .ME)) THEN
  509.     (DRdem 0)
  510.     )
  511. ;
  512.  
  513. dragon(ACTION) =            { Man, the things you can try here... }
  514.     (IF ($prop dragon AWAKE) THEN        { This is the harder stuff }
  515.     (IF ($eq ($verb) strike) THEN
  516.         ($say "This just seems to get him angrier!\n")
  517.         ($setg Tempr ($plus @Tempr 1))
  518.         ($exit 1)
  519.      ELSEIF ($eq ($verb) throw) THEN
  520.         (IF ($eq ($iobj) dragon) THEN
  521.         (IF ($gt ($prop ($dobj) WEIGH) 75) THEN
  522.             ($say "This just bruises him!  Now he's getting mad!\n")
  523.             ($setg Tempr ($plus @Tempr 1))
  524.             ($exit 1)
  525.          ELSE
  526.             ($say "That object is just too light to hurt him.\n")
  527.             ($exit 1)
  528.         )
  529.          ELSE { Dobj action }
  530.         ($say "This amuses the dragon no end!\n")
  531.         ($exit 1)
  532.         )
  533.     )                    { end of Throw  case}
  534.      ELSE                    { he's snoozing}
  535.     (IF ($eq ($verb) wake) THEN
  536.         ($say "You manage to waken him.  He's not happy.\n")
  537.         ($setg Tempr 1)
  538.         ($setp dragon AWAKE TRUE)
  539.         (IF ($and ($eq ($loc wood) ($loc .ME)) ($prop wood FLAME)) THEN
  540.         (KillDragon)
  541.         )
  542.         ($exit 1)
  543.      ELSEIF ($eq ($verb) strike) THEN
  544.         ($say "Now you woke him up!  He's upset, too!\n")
  545.         ($setg Tempr 2)
  546.         ($setp dragon AWAKE TRUE)
  547.         ($exit 1)
  548.      ELSEIF ($eq ($verb) throw) THEN
  549.         (IF ($eq ($iobj) dragon) THEN
  550.         (IF ($gt ($prop ($dobj) WEIGH) 75) THEN
  551.             ($say
  552. "It's just heavy enough to waken him.  The bruise doesn't help
  553. his temper any either.\n"
  554.             )
  555.             ($setp dragon AWAKE TRUE)
  556.             ($setg Tempr 3)
  557.             ($exit 1)
  558.          ELSE
  559.             ($say "That object is just too light to wake him.\n")
  560.             ($exit 1)
  561.         )
  562.          ELSE
  563.         ($say "Don't hurt yourself trying!\n")
  564.         ($exit 1)
  565.         )
  566.     )                    { end of Throw  case}
  567.     )
  568. ;
  569.  
  570.  
  571. NOUN money;
  572. money(WEIGH) = 1;
  573. money(LDESC) = ($say "There is a stack of money here!\n");
  574. money(SDESC) = ($say "a stack of money");
  575. money(POINT) = 25;
  576. stack = money;
  577. FOUND = MISC1;
  578.  
  579.  
  580. NOUN bed (farm7);
  581. bed(WEIGH) = CAPAC;
  582. bed(SDESC) = ($say "an old, rickety bed");
  583.  
  584. bed(ACTION) =
  585.     (IF ($eq ($verb) move) THEN
  586.     (IF ($prop bed OPENED) THEN
  587.         ($say "Stop messing with the bed, it's fragile!\n")
  588.         ($exit 1)
  589.     )
  590.     ($say
  591. "Moving the bed seems to have loosened one of the wall panels
  592. on the west wall.\n"
  593.     )
  594.     ($setp bed OPENED TRUE)
  595.     ($exit 1)
  596.      ELSEIF ($and ($eq @Verb look) ($eq @Prep under) ($eq @Iobj bed)) THEN
  597.     (IF ($eq @Prep under) THEN
  598.         (IF ($not ($prop money FOUND)) THEN
  599.         ($say "You find some money under the bed!\n")
  600.         ($move money ($loc .ME))
  601.         ($setp money FOUND TRUE)
  602.         ($exit 1)
  603.         )
  604.      ELSEIF ($prop bed OPENED) THEN
  605.         ($say "The bed has been moved.\n")
  606.         ($exit 1)
  607.     )
  608.     )
  609. ;
  610.  
  611. NOUN panel (farm7);
  612. panel(OPENS) = TRUE;
  613. panel(WEIGH) = CAPAC;
  614. panel(ACTION) =
  615.     (IF ($or ($eq ($verb) open)
  616.          ($eq ($verb) pry) )
  617.      THEN
  618.     (IF ($and ($eq ($iobj) crowbar)
  619.           ($eq ($loc crowbar) .ME) )
  620.      THEN
  621.         (IF ($not ($prop bed OPENED)) THEN
  622.         ($say "There aren't any loose enough.\n")
  623.         ($exit 1)
  624.         )
  625.         ($say
  626. "The loose panel comes away, revealing a secret stairway down, down...\n"
  627.         )
  628.         ($setp panel OPENED TRUE)
  629.      ELSE
  630.         ($say "You can't seem to get the panel open.\n")
  631.     )
  632.     ($exit 1)
  633.     )
  634. ;
  635.  
  636.  
  637. NOUN bottle(town6);
  638. bottle (WEIGH) = 5;
  639. bottle (LDESC) = ($say "There is a bottle here.\n");
  640. bottle (SDESC) = ($say "a bottle");
  641. bottle (TRANS) = TRUE;
  642. bottle (ACTION) =
  643.     (IF ($eq ($verb) open) THEN
  644.     ($say "Hm, the bottle is somehow sealed shut.\n")
  645.     ($exit 1)
  646.      ELSEIF ($eq ($verb) break) THEN
  647.     ($say "Wow, is that heavy glass!  It won't break!\n")
  648.     ($exit 1)
  649.      ELSEIF ($eq ($verb) strike) THEN
  650.     (IF ($eq ($iobj) bottle) THEN
  651.         ($say "Weird thing to do with it.\n")
  652.      ELSE
  653.         ($say "Nice try, but it isn't even scratched.\n")
  654.     )
  655.     ($exit 1)
  656.     )
  657. ;
  658.  
  659. NOUN ship(bottle);
  660. ship (LDESC) = ($say "There is a golden model ship here!\n");
  661. ship (SDESC) = ($say "a golden model ship");
  662. ship (WEIGH) = 5;
  663. ship (POINT) = 50;
  664. model = ship;
  665.  
  666. NOUN well(town5);
  667. well(NOTAKE) = TRUE;
  668. well (ACTION) =
  669.     (IF ($eq ($iobj) well) THEN
  670.     (IF ($eq ($verb) drop) THEN
  671.         (TWN5y)
  672.     )
  673.     )
  674. ;
  675.  
  676. NOUN painting(cel08);
  677. painting(ACTION) =
  678.     (IF ($eq @Verb take) THEN
  679.     ($say "You can't take the painting.\n")
  680.     ($setg Skip TRUE)
  681.      ELSE
  682.     ($say "Fiddling with the painting is silly.\n")
  683.     ($exit 1)
  684.     )
  685. ;
  686.  
  687. NOUN grate(riverx);
  688. grate(Loc21) = GRATELOC;
  689. grate(ACTION) =
  690.     (IF ($eq @Verb take) THEN
  691.     ($say "You can't take the grate.\n")
  692.     ($setg Skip TRUE)
  693.      ELSE
  694.     ($say "Fiddling with the grate is useless.\n")
  695.     ($exit 1)
  696.     )
  697. ;
  698.  
  699. NOUN insignia;
  700. insignia(NOTAKE) = TRUE;
  701. insignia (WEIGH) = CAPAC;
  702. insignia (ACTION) =
  703.     (IF ($eq ($verb) examine) THEN
  704.     (IF ($eq ($loc .ME) cel01) THEN
  705.         ($say
  706. "The insignia consists of red and green squares joined at the corners.\n"
  707.         )
  708.      ELSEIF ($eq ($loc .ME) cel04) THEN
  709.         ($say
  710. "The insignia consists of red and clear squares joined at the corners.\n"
  711.         )
  712.      ELSEIF ($eq ($loc .ME) cel08) THEN
  713.         ($say
  714. "The insignia consists of red and blue squares joined at the corners.\n"
  715.         )
  716.      ELSEIF ($eq ($loc .ME) farm5) THEN
  717.         ($say
  718. "The insignia consists of blue and green squares joined at the corners.\n"
  719.         )
  720.     )
  721.     ($exit 1)
  722.     )
  723.     ($say "There's nothing useful to do with the insignia.\n")
  724.     ($exit 1)
  725. ;
  726. square=insignia;
  727.  
  728. NOUN glass box(cel08);
  729. glass box(HOLDS)=1;
  730. glass box(TRANS)=TRUE;
  731. glass box(OPENS)=TRUE;
  732. glass box(OPENED)=FALSE;
  733. glass box(SHRNK)=TRUE;          { First seen as a tiny box }
  734. glass box(LDESC) =
  735.     (IF ($eq ($prop .ME SHRNK) ($prop [glass box] SHRNK)) THEN
  736.     ($say "There is a big glass case here.\n")
  737.     ($setp [glass box] WEIGH CAPAC)
  738.     ($setp [glass box] HOLDS 50)
  739.      ELSE
  740.     (IF ($prop .ME SHRNK) THEN
  741.         ($say
  742. "Before you looms a huge glass wall, inscribed with the words,
  743.     'program error!'\n"
  744.         )
  745.      ELSE
  746.         ($say "There is a tiny glass box with a snap lid here.\n")
  747.         ($setp [glass box] WEIGH 5)
  748.         ($setp [glass box] HOLDS 1)
  749.     )
  750.     )
  751. ;
  752. glass box(SDESC) =
  753.    (IF ($eq ($prop .ME SHRNK) ($prop [glass box] SHRNK)) THEN
  754.     ($say "a glass case")
  755.     ($setp [glass box] WEIGH CAPAC)
  756.     ($setp [glass box] HOLDS 50)
  757.      ELSE
  758.     (IF ($prop .ME SHRNK) THEN
  759.         ($say
  760. "a huge glass wall, inscribed with the words,
  761.     'program error'"
  762.         )
  763.      ELSE
  764.         ($say "a tiny glass box")
  765.         ($setp [glass box] WEIGH 5)
  766.         ($setp [glass box] HOLDS 1)
  767.     )
  768.     )
  769. ;
  770. glass box(ACTION) =
  771.     (IF ($eq ($verb) examine) THEN
  772.     (IF ($prop [glass box] OPENED) THEN
  773.         ($say "The case is opened.\n")
  774.      ELSE
  775.         ($say "The case is closed (pun not intended).\n")
  776.     )
  777.     ($exit 1)
  778.     )
  779. ;
  780. case=glass box;
  781.  
  782. NOUN statue(glass box);
  783. sand = statue;
  784. sand(SHRNK)=TRUE;
  785. sand(WEIGH)=1;
  786. sand(LDESC)=
  787.     (IF ($and ($prop sand SHRNK) ($not ($prop .ME SHRNK))) THEN
  788.     ($setp sand POINT 0)
  789.     ($say "There is a grain of sand here.\n")
  790.      ELSE
  791.     ($say "There is a beautiful porcelain statue here!\n")
  792.     ($setp sand POINT 50)
  793.     )
  794. ;
  795. sand(SDESC)=
  796.     (IF ($and ($prop sand SHRNK) ($not ($prop .ME SHRNK))) THEN
  797.     ($setp sand POINT 0)
  798.     ($say "a grain of sand")
  799.      ELSE
  800.     ($say "a porcelain statue")
  801.     ($setp sand POINT 50)
  802.     )
  803. ;
  804. sand(ACTION)=
  805.     (IF ($eq ($verb) take) THEN
  806.     (IF ($and ($prop sand SHRNK) ($not ($prop .ME SHRNK))) THEN
  807.         ($say "You fumble the grain of sand and lose it on the ground.\n")
  808.         ($move sand .ALL)
  809.         ($setg Skip TRUE)
  810.     )
  811.     )
  812. ;
  813.  
  814. NOUN hole;
  815. hole(NOTAKE) = TRUE;
  816. hole(ACTION) =
  817.     ($say "You can't do anything useful with the hole.\n")
  818.     ($exit 1)
  819. ;
  820.  
  821. NOUN rock(road5);
  822. rock(LDESC)=($say "There is a plain-looking rock here.\n");
  823. rock(SDESC)=($say "an ordinary rock");
  824. rock(ACTION)=
  825.     (IF ($and ($eq ($verb) take) ($eq ($dobj) rock)) THEN
  826.     ($say "Mmph!  Heavy!\n")
  827.     )
  828. ;
  829. rock(WEIGH)=100;
  830.  
  831. IFOUND = MISC1;
  832. NOUN ivory(riverx);
  833. ivory(WEIGH) = 5;
  834. ivory(POINT) = 25;
  835. ivory(Loc21) = GRATELOC;
  836. ivory(LDESC) =
  837.     ($say "There is a beautiful piece of ivory ")
  838.     (IF ($not ($prop ivory IFOUND)) THEN
  839.     ($say "wedged in the grate.\n")
  840.     ($setp ivory IFOUND TRUE)
  841.      ELSE
  842.     ($say "here.\n")
  843.     )
  844. ;
  845. ivory(SDESC) =
  846.     ($say "a piece of ivory")
  847.     (IF ($not ($prop ivory IFOUND)) THEN
  848.     ($say " (wedged in the grate)")
  849.     ($setp ivory IFOUND TRUE)
  850.     )
  851. ;
  852.  
  853.  
  854. NOUN matches(cel12);
  855. matches(LDESC) = ($say "There is a book of waterproof matches here.\n");
  856. matches(SDESC) = ($say "a book of matches");
  857. matches(ACTION) =
  858.     (IF ($and ($or ($eq @Verb light) ($eq @Verb burn)) ($eq @Dobj matches)) THEN
  859.     ($say "OK, you light a match, which quickly burns out.\n")
  860.     ($exit 1)
  861.     )
  862. ;
  863. matches(WEIGH) = 1;
  864. book = matches;
  865.  
  866. WoodBurn =
  867.     (IF ($eq ($loc wood) ($loc .ME)) THEN
  868.     ($say "The wood burns down to a pile of ashes, which blows away.\n")
  869.     )
  870.     ($move wood .ALL)
  871.     ($setp wood FLAME FALSE)
  872. ;
  873.  
  874.  
  875. { NOUN wood(cel20); }
  876. wood(LDESC) =
  877.     ($say "There is a pile of ")
  878.     (IF ($prop wood FLAME) THEN
  879.     ($say "burning ")
  880.     )
  881.     ($say "wood here.\n")
  882. ;
  883. wood(SDESC) =
  884.     ($say "a pile of ")
  885.     (IF ($prop wood FLAME) THEN
  886.     ($say "burning ")
  887.     )
  888.     ($say "wood")
  889. ;
  890. wood(WEIGH) = 100;
  891. wood(ACTION) =
  892.     (IF ($prop wood FLAME) THEN
  893.     ($say "The wood is too hot to touch.\n")
  894.     (IF ($or ($eq @Verb take) ($eq @Verb drop)) THEN
  895.         ($setg Skip TRUE)
  896.         ($return 0)
  897.      ELSE
  898.         ($exit 1)
  899.     )
  900.      ELSEIF ($or ($eq @Verb burn) ($eq @Verb light)) THEN
  901.     (IF ($not @Iobj) THEN
  902.         ($say "You must tell me how to do that!\n")
  903.         ($exit 1)
  904.      ELSEIF ($ne @Iobj matches) THEN
  905.         ($say "That doesn't seem to work.\n")
  906.         ($exit 1)
  907.      ELSEIF ($eq ($loc wood) .ME) THEN
  908.         ($say "You can't manage that while you are holding the wood.\n")
  909.         ($exit 1)
  910.     )
  911.     ($say
  912. "You strike a match and apply it to the wood, which bursts into flames.\n"
  913.     )
  914.     (IF ($and ($prop dragon AWAKE) ($eq ($loc .ME) ($loc dragon))) THEN
  915.         (KillDragon)
  916.      ELSE
  917.         ($setp wood FLAME TRUE)
  918.         ($sfus .ME WoodBurn 3)
  919.     )
  920.     ($exit 1)
  921.     )
  922. ;
  923.  
  924.  
  925. KillDragon =
  926.     ($say
  927. "The dragon, attracted by the bright flame of the burning wood, snaps it up in
  928. its jaws.  Suddenly, the dragon realizes what it has done!  It tries to spit
  929. out the wood, but it is too late!  The dragon evaporates with a deafening
  930. whistle and a burst of steam!  "
  931.     )
  932.     (IF ($or ($eq ($loc bottle) ($loc .ME))
  933.          ($eq ($loc bottle) .ME)
  934.     )
  935.      THEN
  936.     ($say
  937. "The sound of the whistle shatters the bottle,
  938. releasing the golden ship model!  "
  939.     )
  940.     ($move ship ($loc .ME))
  941.     ($move bottle .ALL)
  942.     )
  943.     ($say
  944. "Upon the death of the dragon, the ice melts with astonishing speed.\n"
  945.     )
  946.     ($dfus .ME WoodBurn)
  947.     ($move wood .ALL)
  948.     ($setp dragon KILLED TRUE)
  949.     ($move dragon .ALL)
  950.     ($setg SCORE ($plus @SCORE 100))
  951.     ($setp cel06 SEEN FALSE)
  952.     ($setp cel05 SEEN FALSE)
  953.     ($setp cel03 SEEN FALSE)
  954.     ($setp cel10 SEEN FALSE)
  955.     ($setp cel08 SEEN FALSE)
  956. ;
  957.  
  958. NOUN goblet(cel19);
  959. FREED = MISC1;
  960. goblet(WEIGH) = 5;
  961. goblet(POINT) = 25;
  962. goblet(LDESC) =
  963.     (IF ($not ($prop goblet FREED)) THEN
  964.     ($say "There is a beautiful golden goblet frozen in the ice!\n")
  965.      ELSE
  966.     ($say "There is a beautiful golden goblet here!\n")
  967.     )
  968. ;
  969. goblet(SDESC) =
  970.     ($say "a golden goblet")
  971.     (IF ($not ($prop goblet FREED)) THEN
  972.     ($say " (frozen in the ice)")
  973.     )
  974. ;
  975. goblet(ACTION) =
  976.     (IF ($not ($prop goblet FREED)) THEN
  977.     ($say
  978. "There's not much you can do with the goblet while it's frozen
  979. in the ice.\n"
  980.     )
  981.     ($exit 1)
  982.     )
  983. ;
  984.  
  985. NOUN newspaper(town2);
  986. paper = newspaper;
  987. newspaper(LDESC) =
  988.     ($say "There is a newspaper fluttering in the breeze here.\n")
  989. ;
  990. newspaper(SDESC) = ($say "a newspaper");
  991. newspaper(ACTION) =
  992.     (IF ($or ($eq ($verb) read) ($eq ($verb) examine)) THEN
  993.     ($say "        UNUCHEVALA NEWS -- VOLUME II NUMBER 1\n\n")
  994.     ($say
  995. "VANDALS THREATEN COWLEY
  996.  
  997.     Last night,  unknown vandals attacked the farm of Mr. Cowley,  north of
  998. town.  They sprayed \"DIE, HEATHENS\" on  his front door (in reference to his
  999. admittedly strange  beliefs).   Cowley says that this is not the first such
  1000. threat he has received. However, he says that he will deal with the vandals
  1001. in his own way.   Unfortunately,  we have been unable to contact Mr. Cowley
  1002. personally, since he has not been seen hereabouts since last night.\n\n"
  1003.     )
  1004.     ($say
  1005. "DROUGHT IMMINENT, SAY LOCAL FARMERS
  1006.  
  1007.      The  Unuchevala  River has recently  been  falling,  and little relief
  1008. is in sight for our  local farmers.   \"I'm agonna  leave here, purty soon,\"
  1009. said one farmer  (who chose  to  remain anonymous).   \"It's all that danged
  1010. Cowley's fault,  messin'  about  with  things  that  ain't natrawl-like.  I
  1011. caint even raise 'nuff to feed myself, not mentionin' the resta the town.\"\n\n"
  1012.     )
  1013.     ($say "WEATHER -- Continued dry, with no rain in sight.\n\n")
  1014.     ($exit 1)
  1015.      ELSEIF ($or ($eq @Verb burn) ($eq @Verb light)) THEN
  1016.     (IF ($not @Iobj) THEN
  1017.         ($say "You must tell me how to do that!\n")
  1018.         ($exit 1)
  1019.      ELSEIF ($ne @Iobj matches) THEN
  1020.         ($say "That doesn't seem to work.\n")
  1021.         ($exit 1)
  1022.      ELSEIF ($eq ($loc newspaper) .ME) THEN
  1023.         ($say "You can't manage to do that while holding the newspaper.\n")
  1024.         ($exit 1)
  1025.     )
  1026.     ($say
  1027. "The newspaper lights easily, burning down to ashes which blow away.\n"
  1028.     )
  1029.     (IF ($and ($eq ($loc .ME) ($loc dragon)) ($prop dragon AWAKE)) THEN
  1030.     { give the player a hint }
  1031.         ($say
  1032. "The dragon notices the flash and approaches the newspaper,
  1033. but the fire dies down before the dragon can reach it.\n"
  1034.         )
  1035.     )
  1036.     ($move newspaper .ALL)
  1037.     ($exit 1)
  1038.     )
  1039. ;
  1040.  
  1041. NOUN ice;
  1042. ice(NOTAKE) = TRUE;
  1043. ice(ACTION) =
  1044.     (IF ($or ($eq @Verb break) ($eq @Verb hit)) THEN
  1045.     (IF ($eq @Dobj ice) THEN
  1046.         (IF ($not @Iobj) THEN
  1047.         ($say "You must tell me how to do that.\n")
  1048.         ($exit 1)
  1049.         )
  1050.         (IF ($eq ($loc .ME) cel19) THEN
  1051.         (IF ($gt ($prop @Iobj WEIGH) 20) THEN
  1052.             (IF ($not ($prop goblet FREED)) THEN
  1053.             ($say "You manage to free the goblet.\n")
  1054.             ($setp goblet FREED TRUE)
  1055.             ($move goblet cel19)
  1056.             ($exit 1)
  1057.             )
  1058.         )
  1059.          ELSEIF ($eq ($loc .ME) cel13) THEN
  1060.         (IF ($not ($prop cel13 HOLED)) THEN
  1061.             (IF ($gt ($prop @Iobj WEIGH) 75) THEN
  1062.             ($say
  1063. "You swing at the ice with the " ($name @Iobj)
  1064. ", which breaks through and sinks into
  1065. the icy waters below!\n"
  1066.             )
  1067.             ($move @Iobj .ALL)
  1068.             ($setp cel13 HOLED TRUE)
  1069.             ($exit 1)
  1070.             )
  1071.         )
  1072.         )
  1073.         ($say "The ice chips a bit, but does not break.\n")
  1074.         ($exit 1)
  1075.        )
  1076.     )
  1077.     ($say "You can't do that!\n")
  1078.     ($exit 1)
  1079. ;
  1080.